Limiting the rows returned by a query
You can set an advanced filter on a query to set a hard limit or a default value for the number of returned rows. When coupled with sort criteria, this filter can effect a "top n records" type of result.
To limit the number of rows returned by a query
- Create or edit a query.
- Select the Filters tab.
- From the Mode drop-down list, choose Advanced.
A Query Options section appears on the Filters tab.
- Select the Limit the number of results returned checkbox.
- In the corresponding Value field, enter the number of rows that the query should return.
- From the corresponding Prompt drop-down list, choose the prompt type for this filter:
- No - Enforces a hard limit on the specified number of returned rows, which a user cannot change.
- Optional or Required - Makes the specified number of returned rows a default value, which a user can change to any value up to the maximum defined in the web.config file for iMIS Server .NET. If the user specifies 0 or a blank value, the query returns the maximum defined in the web.config file.
- (optional) If you want custom text for the prompt instead of the default "Maximum number of rows to display", enter your custom text in the field at the right of the Prompt drop-down list.
- (optional) If you want to create a "top n records" type of query result, specify at least one property on the Sorting tab.